<?php
		
		if($mail_info->num_rows()>0){
			$i=1;
			foreach($mail_info->result() as $row){
				$mail_id=$row->product_owner_mail_id;
				$subject=$row->subject;
				$message=$row->message_reply;
				//$send_to=$row->use_send_to_simple_user_id;
				$send_from=$row->username;
				$mail_status=$row->status;
				echo $message."<br />";
				
			}
			
		}else{
			redirect("account/mails");
		}
										

?>
<div class="login">
	<div class="wrap">
		<ul class="breadcrumb breadcrumb__t">
			<a class="home" href="<?php echo base_url(); ?>">Home</a> / You are logged in as <?php echo $this -> mod_account -> get_logged_in_user_info() -> email; ?>
		</ul>
		<div class="section group">
			<?php $this -> load -> view(F_MASTER . "dashboard_account"); ?>

			<div class="cont span_2_of_about">
				<h3>From : <?php echo $send_from;?> ,
				<br/>
				Subject : <?php echo $subject;?></h3>

				<p>
					<?php echo $message;?>
				</p>
				
				<br />

				<p>
					Best regard,
				</p>

				<p>
					<i>Sok.Rithy</i>
				</p>
				<!--<a href="<?php echo base_url(); ?>account/reply-mail/<?php echo $this -> uri -> segment(3); ?>">
				<button class="btn btn-primary" style="float: right;">
					Reply Mail
				</button></a>-->
					
					<div id="flip"><a href="#">Click to reply</a></div>
					<div id="panel">
						<form class="form-horizontal" method="post" action="<?php echo base_url(); ?>account/reply_mail/<?php echo $this->uri->segment(3);?>">	
		<div class="row">
                <div class="col-lg-12">
                	<?php
					//$this->load->view('help/notifications');
                    ?>
                    <div class="panel panel-primary">
                        
                        <!-- /.panel-heading -->
                        <div class="panel-body form-horizontal">
							
							
							
							
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-3 control-label" for="message">Message :</label>
								<div class="col-md-9">
									<textarea class="form-control" rows="12" name="message"></textarea>
									<span class="help-block"><?php echo form_error('message'); ?></span>
								</div>
							</div>
							
							
											
                         </div>
                    </div>
                </div>
           </div>
           
           
           
           <div class="row"><!-- Button (Double) -->
							
                <div class="col-lg-8">
                    	<div class="form-group">
								<label class="col-md-3 control-label" for="submit"></label>
								<div class="col-md-9">
									<button id="submit" name="submit" class="btn btn-success" type="submit">
										<span class="glyphicon glyphicon-envelope"></span>
										Reply
									</button>
									<button id="clear" name="clear" class="btn btn-warning" type="button" onclick="goBack()">
										<span class="glyphicon glyphicon-remove"></span>
										<?php echo $this -> lang -> line('button_cancel'); ?>
									</button>
								</div>
							</div>
                </div>
                <!-- /.col-lg-12 -->
            </div>
</form>
					</div>
				<div style="clear: both;"></div>
				<br />

			</div>
		</div>
		<div class="clear"></div>
	</div>
</div>
<script> 
$(document).ready(function(){
  $("#flip").click(function(){
    $("#panel").slideToggle("slow");
  });
});
</script>